package config

import (
	"github.com/gin-gonic/gin"

	"gin/controller"
	"gin/middleware"
)

type Routes struct {
}

func (r *Routes) SetRouter(app *gin.Engine) {
	router := app.Group("/index")
	//路由中间件
	cors := middleware.NewCors()
	router.Use(cors.Process)
	{
		//请求转发控制器
		hello := controller.NewHelloController()
		router.GET("/index", hello.Index)

	}

}
